# REFERENCE: https://zhuanlan.zhihu.com/p/63426143

FROM ufoym/deepo:pytorch-cu111
RUN apt update && apt install openssh-server -y
RUN echo "PermitRootLogin yes" >> /etc/ssh/sshd_config &&\
        echo "PubkeyAuthentication yes" >> /etc/ssh/sshd_config &&\
        echo "AuthorizedKeysFile  .ssh/authorized_keys" >> /etc/ssh/sshd_config &&\
        /etc/init.d/ssh restart &&\
        mkdir -p ~/.ssh &&\
        echo "" > ~/.ssh/authorized_keys # Your public key here

ENTRYPOINT ["/usr/sbin/sshd", "-D"]
